]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Notify on BoxLayout property changes
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 6 Jul 2013 22:11:02 +0000 (00:11 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 20 Aug 2013 06:06:30 +0000 (08:06 +0200)
We didn't do this before, but it might come in handy eventually,
so add change notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=703810

src/st/st-box-layout.c

index e333dcd84c6401f54ca7d0b05ee25bc57d7ef281..628181918151857eb070eff8631e062c14e94aa3 100644 (file)
@@ -544,6 +544,18 @@ st_box_layout_style_changed (StWidget *self)
   ST_WIDGET_CLASS (st_box_layout_parent_class)->style_changed (self);
 }
 
+static void
+layout_notify (GObject    *object,
+               GParamSpec *pspec,
+               gpointer    user_data)
+{
+  GObject *self = user_data;
+  const char *prop_name = g_param_spec_get_name (pspec);
+
+  if (g_object_class_find_property (G_OBJECT_GET_CLASS (self), prop_name))
+    g_object_notify (self, prop_name);
+}
+
 static void
 st_box_layout_class_init (StBoxLayoutClass *klass)
 {
@@ -602,6 +614,7 @@ st_box_layout_init (StBoxLayout *self)
   layout = clutter_box_layout_new ();
   g_signal_connect_swapped (layout, "layout-changed",
                             G_CALLBACK (clutter_actor_queue_relayout), self);
+  g_signal_connect (layout, "notify", G_CALLBACK (layout_notify), self);
   clutter_actor_set_layout_manager (CLUTTER_ACTOR (self), layout);
 }